<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>OpenMesh: OpenMesh::Utils::HeapT&lt; HeapEntry, HeapInterface &gt; Class Template Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="logo_align.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="rwth_vci_rgb.jpg"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">OpenMesh
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('a03073.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-attribs">Protected Attributes</a> &#124;
<a href="a03070.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">OpenMesh::Utils::HeapT&lt; HeapEntry, HeapInterface &gt; Class Template Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>An efficient, highly customizable heap.  
 <a href="a03073.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="a00734_source.html">OSG/Utils/HeapT.hh</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for OpenMesh::Utils::HeapT&lt; HeapEntry, HeapInterface &gt;:</div>
<div class="dyncontent">
<div class="center"><img src="a03072.png" border="0" usemap="#OpenMesh_1_1Utils_1_1HeapT_3_01HeapEntry_00_01HeapInterface_01_4_inherit__map" alt="Inheritance graph"/></div>
<map name="OpenMesh_1_1Utils_1_1HeapT_3_01HeapEntry_00_01HeapInterface_01_4_inherit__map" id="OpenMesh_1_1Utils_1_1HeapT_3_01HeapEntry_00_01HeapInterface_01_4_inherit__map">
<area shape="rect" id="node2" title="STL class. " alt="" coords="19,5,190,32"/>
</map>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>
<div class="dynheader">
Collaboration diagram for OpenMesh::Utils::HeapT&lt; HeapEntry, HeapInterface &gt;:</div>
<div class="dyncontent">
<div class="center"><img src="a03071.png" border="0" usemap="#OpenMesh_1_1Utils_1_1HeapT_3_01HeapEntry_00_01HeapInterface_01_4_coll__map" alt="Collaboration graph"/></div>
<map name="OpenMesh_1_1Utils_1_1HeapT_3_01HeapEntry_00_01HeapInterface_01_4_coll__map" id="OpenMesh_1_1Utils_1_1HeapT_3_01HeapEntry_00_01HeapInterface_01_4_coll__map">
<area shape="rect" id="node2" title="STL class. " alt="" coords="19,95,190,121"/>
</map>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a24a2c62d488a9a9e73572ad7820a8e68"><td class="memItemLeft" align="right" valign="top"><a id="a24a2c62d488a9a9e73572ad7820a8e68"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a03073.html#a24a2c62d488a9a9e73572ad7820a8e68">HeapT</a> ()</td></tr>
<tr class="memdesc:a24a2c62d488a9a9e73572ad7820a8e68"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor. <br /></td></tr>
<tr class="separator:a24a2c62d488a9a9e73572ad7820a8e68"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a03ec9a9ca32d9d6409e980b90d53f54b"><td class="memItemLeft" align="right" valign="top"><a id="a03ec9a9ca32d9d6409e980b90d53f54b"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a03073.html#a03ec9a9ca32d9d6409e980b90d53f54b">HeapT</a> (const HeapInterface &amp;_interface)</td></tr>
<tr class="memdesc:a03ec9a9ca32d9d6409e980b90d53f54b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Construct with a given <code>HeapIterface</code>. <br /></td></tr>
<tr class="separator:a03ec9a9ca32d9d6409e980b90d53f54b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7e0a462d94cdd0c68aeeaaeadfa78d2d"><td class="memItemLeft" align="right" valign="top"><a id="a7e0a462d94cdd0c68aeeaaeadfa78d2d"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a03073.html#a7e0a462d94cdd0c68aeeaaeadfa78d2d">~HeapT</a> ()</td></tr>
<tr class="memdesc:a7e0a462d94cdd0c68aeeaaeadfa78d2d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destructor. <br /></td></tr>
<tr class="separator:a7e0a462d94cdd0c68aeeaaeadfa78d2d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aba777f483777c18a4ce9d7a6a87993c8"><td class="memItemLeft" align="right" valign="top"><a id="aba777f483777c18a4ce9d7a6a87993c8"></a>
HeapInterface &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>getInterface</b> ()</td></tr>
<tr class="separator:aba777f483777c18a4ce9d7a6a87993c8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab1c146d6ec9a3460e077d63c759437eb"><td class="memItemLeft" align="right" valign="top"><a id="ab1c146d6ec9a3460e077d63c759437eb"></a>
const HeapInterface &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>getInterface</b> () const</td></tr>
<tr class="separator:ab1c146d6ec9a3460e077d63c759437eb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afef1992d5a553b9e8d152af61b9e4fc2"><td class="memItemLeft" align="right" valign="top"><a id="afef1992d5a553b9e8d152af61b9e4fc2"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a03073.html#afef1992d5a553b9e8d152af61b9e4fc2">clear</a> ()</td></tr>
<tr class="memdesc:afef1992d5a553b9e8d152af61b9e4fc2"><td class="mdescLeft">&#160;</td><td class="mdescRight">clear the heap <br /></td></tr>
<tr class="separator:afef1992d5a553b9e8d152af61b9e4fc2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a536a85f292f05b98593afbb682e54471"><td class="memItemLeft" align="right" valign="top"><a id="a536a85f292f05b98593afbb682e54471"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a03073.html#a536a85f292f05b98593afbb682e54471">empty</a> () const</td></tr>
<tr class="memdesc:a536a85f292f05b98593afbb682e54471"><td class="mdescLeft">&#160;</td><td class="mdescRight">is heap empty? <br /></td></tr>
<tr class="separator:a536a85f292f05b98593afbb682e54471"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2c81430f8b72e3aae305b025d83c3307"><td class="memItemLeft" align="right" valign="top"><a id="a2c81430f8b72e3aae305b025d83c3307"></a>
size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a03073.html#a2c81430f8b72e3aae305b025d83c3307">size</a> () const</td></tr>
<tr class="memdesc:a2c81430f8b72e3aae305b025d83c3307"><td class="mdescLeft">&#160;</td><td class="mdescRight">returns the size of heap <br /></td></tr>
<tr class="separator:a2c81430f8b72e3aae305b025d83c3307"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab25df952eaf2a9195243759dab1c252e"><td class="memItemLeft" align="right" valign="top"><a id="ab25df952eaf2a9195243759dab1c252e"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a03073.html#ab25df952eaf2a9195243759dab1c252e">reserve</a> (size_t _n)</td></tr>
<tr class="memdesc:ab25df952eaf2a9195243759dab1c252e"><td class="mdescLeft">&#160;</td><td class="mdescRight">reserve space for _n entries <br /></td></tr>
<tr class="separator:ab25df952eaf2a9195243759dab1c252e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a35feb375cbcf48457e8e2d6307fe7fba"><td class="memItemLeft" align="right" valign="top"><a id="a35feb375cbcf48457e8e2d6307fe7fba"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a03073.html#a35feb375cbcf48457e8e2d6307fe7fba">reset_heap_position</a> (HeapEntry _h)</td></tr>
<tr class="memdesc:a35feb375cbcf48457e8e2d6307fe7fba"><td class="mdescLeft">&#160;</td><td class="mdescRight">reset heap position to -1 (not in heap) <br /></td></tr>
<tr class="separator:a35feb375cbcf48457e8e2d6307fe7fba"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af286643ed54c1f7252989b2a525c0c07"><td class="memItemLeft" align="right" valign="top"><a id="af286643ed54c1f7252989b2a525c0c07"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a03073.html#af286643ed54c1f7252989b2a525c0c07">is_stored</a> (HeapEntry _h)</td></tr>
<tr class="memdesc:af286643ed54c1f7252989b2a525c0c07"><td class="mdescLeft">&#160;</td><td class="mdescRight">is an entry in the heap? <br /></td></tr>
<tr class="separator:af286643ed54c1f7252989b2a525c0c07"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a986a09f8eef49ee033663b59fa068c22"><td class="memItemLeft" align="right" valign="top"><a id="a986a09f8eef49ee033663b59fa068c22"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a03073.html#a986a09f8eef49ee033663b59fa068c22">insert</a> (HeapEntry _h)</td></tr>
<tr class="memdesc:a986a09f8eef49ee033663b59fa068c22"><td class="mdescLeft">&#160;</td><td class="mdescRight">insert the entry _h <br /></td></tr>
<tr class="separator:a986a09f8eef49ee033663b59fa068c22"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9a19c24235081b7e5fcdbc1ee59453c3"><td class="memItemLeft" align="right" valign="top"><a id="a9a19c24235081b7e5fcdbc1ee59453c3"></a>
HeapEntry&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a03073.html#a9a19c24235081b7e5fcdbc1ee59453c3">front</a> () const</td></tr>
<tr class="memdesc:a9a19c24235081b7e5fcdbc1ee59453c3"><td class="mdescLeft">&#160;</td><td class="mdescRight">get the first entry <br /></td></tr>
<tr class="separator:a9a19c24235081b7e5fcdbc1ee59453c3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa0f851857c3aee86ea1eb763a5980660"><td class="memItemLeft" align="right" valign="top"><a id="aa0f851857c3aee86ea1eb763a5980660"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a03073.html#aa0f851857c3aee86ea1eb763a5980660">pop_front</a> ()</td></tr>
<tr class="memdesc:aa0f851857c3aee86ea1eb763a5980660"><td class="mdescLeft">&#160;</td><td class="mdescRight">delete the first entry <br /></td></tr>
<tr class="separator:aa0f851857c3aee86ea1eb763a5980660"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac141346bca01e86f1f7d9e4f0f2a9d8c"><td class="memItemLeft" align="right" valign="top"><a id="ac141346bca01e86f1f7d9e4f0f2a9d8c"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a03073.html#ac141346bca01e86f1f7d9e4f0f2a9d8c">remove</a> (HeapEntry _h)</td></tr>
<tr class="memdesc:ac141346bca01e86f1f7d9e4f0f2a9d8c"><td class="mdescLeft">&#160;</td><td class="mdescRight">remove an entry <br /></td></tr>
<tr class="separator:ac141346bca01e86f1f7d9e4f0f2a9d8c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5a4198bf734a87481ee5fedc46f2eebd"><td class="memItemLeft" align="right" valign="top"><a id="a5a4198bf734a87481ee5fedc46f2eebd"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a03073.html#a5a4198bf734a87481ee5fedc46f2eebd">update</a> (HeapEntry _h)</td></tr>
<tr class="memdesc:a5a4198bf734a87481ee5fedc46f2eebd"><td class="mdescLeft">&#160;</td><td class="mdescRight">update an entry: change the key and update the position to reestablish the heap property. <br /></td></tr>
<tr class="separator:a5a4198bf734a87481ee5fedc46f2eebd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3acd94c1497f8b6afd9548ffd64e2318"><td class="memItemLeft" align="right" valign="top"><a id="a3acd94c1497f8b6afd9548ffd64e2318"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a03073.html#a3acd94c1497f8b6afd9548ffd64e2318">check</a> ()</td></tr>
<tr class="memdesc:a3acd94c1497f8b6afd9548ffd64e2318"><td class="mdescLeft">&#160;</td><td class="mdescRight">check heap condition <br /></td></tr>
<tr class="separator:a3acd94c1497f8b6afd9548ffd64e2318"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr class="memitem:afb629f999cdff18c71780372ffa4a655"><td class="memItemLeft" align="right" valign="top"><a id="afb629f999cdff18c71780372ffa4a655"></a>
HeapInterface&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a03073.html#afb629f999cdff18c71780372ffa4a655">interface_</a></td></tr>
<tr class="memdesc:afb629f999cdff18c71780372ffa4a655"><td class="mdescLeft">&#160;</td><td class="mdescRight">Instance of HeapInterface. <br /></td></tr>
<tr class="separator:afb629f999cdff18c71780372ffa4a655"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><h3>template&lt;class HeapEntry, class HeapInterface = HeapEntry&gt;<br />
class OpenMesh::Utils::HeapT&lt; HeapEntry, HeapInterface &gt;</h3>

<p>An efficient, highly customizable heap. </p>
<p>The main difference (and performance boost) of this heap compared to e.g. the heap of the STL is that here the positions of the heap's elements are accessible from the elements themself. Therefore if one changes the priority of an element one does not have to remove and re-insert this element, but can just call the <a class="el" href="a03073.html#a5a4198bf734a87481ee5fedc46f2eebd" title="update an entry: change the key and update the position to reestablish the heap property. ">update(HeapEntry)</a> method.</p>
<p>This heap class is parameterized by two template arguments: </p><ul>
<li>the class <code>HeapEntry</code>, that will be stored in the heap </li>
<li>the HeapInterface telling the heap how to compare heap entries and how to store the heap positions in the heap entries.</li>
</ul>
<p>As an example how to use the class see declaration of class <a class="el" href="a02637.html" title="Decimater framework. ">Decimater::DecimaterT</a>.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="a03069.html" title="This class demonstrates the HeapInterface&#39;s interface. ">HeapInterfaceT</a> </dd></dl>
</div><hr/>The documentation for this class was generated from the following file:<ul>
<li>OpenMesh/Tools/Utils/<a class="el" href="a00734_source.html">HeapT.hh</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<hr>
<address>
<small>
<a href="http://www.rwth-graphics.de" style="text-decoration:none;">
</a>
Project <b>OpenMesh</b>, 
&copy;&nbsp; Computer Graphics Group, RWTH Aachen.
Documentation generated using 
<a class="el" href="http://www.doxygen.org/index.html">
<b>doxygen</b>
</a>.
</small>
</address>
</body>
</html>
